<?php
/** 
 * $Source: /cvsroot/pn-commerce/pn-commerce/pntemplates/plugins/function.pncGoBackLink.php,v $
 * $Author: landseer $
 * $Revision: 1.1 $
 * $Date: 2004/01/30 19:45:58 $
 *
 * Type: Function
 *
 * returns a complete form to jum back to the url saved in PNCBacklinkPoint session variable
 *@return nothing
 */
function smarty_function_pncGoBackLink($params, &$smarty)
{
    extract($params);
    $temp  = "<form action='".pnSessionGetVar( 'PNCBacklinkPoint' )."' method='post'>\n";
    $temp .= "<input type='hidden' name='authid' value='".pnSecGenAuthKey('pncommerce')."'>\n";
    if( isset( $img ) )
    {
        // show $img
        include_once( 'modules/pncommerce/pntemplates/plugins/function.pnimgsrc.php' );
        $temp .= "<input type='image' src='".smarty_function_pnimgsrc( array( 'name' => $img, 'smarty' => $smarty ) )."' name='backlink' value='set'>\n";
    }
    else
    {
        $temp .= "<input class='pn-button' type='submit' name='backlink' value='".pnVarPrepForDisplay( _PNC_BACK )."'>\n";
    }
    $temp .= "</form>";
    return $temp;
}
?>
